﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using GtsServer.Model;
using GtsServer.DAL;
using GtsServer.Common;

namespace GtsServer.Manage.Controller
{
    public class ChanceMouldController
    {
        ChanceMouldDAL dal = new ChanceMouldDAL();
        public List<ChanceMould> GetList(string strWhere = "")
        {
            List<ChanceMould> list = new List<ChanceMould>();
            DataSet ds = dal.GetList(strWhere);
            list = IListDataSet.DataSetToIList<ChanceMould>(ds, 0).ToList();
            return list;
        }

        public int Add(ChanceMould model)
        {
            return dal.Add(model);
        }

        public bool Update(ChanceMould model)
        {
            return dal.Update(model);
        }

        public bool Delete(int id)
        {
            return dal.Delete(id);
        }
    }
}
